package com.dqyt.app.controller;

import com.dqyt.app.bean.WorkBean;
import com.dqyt.app.service.AppReceiptTbService;
import com.dqyt.common.utils.UserInfoUtil;
import com.dqyt.khjc.bean.ResultMsg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@RestController
public class AppReceiptTbController {


    @Autowired
    private AppReceiptTbService appReceiptTbService;

    /**
     *  分页查询 工作量确认单
     *
     * @param request
     * @return
     */
    @RequestMapping("/sample/getQrdListPage")
    public ResultMsg getQrdListPage(HttpServletRequest request,
                                     String token,long userId,
                                     @RequestParam(defaultValue = "1") Integer page,
                                     @RequestParam(defaultValue = "10") Integer size


    ) {
        ResultMsg resultMsg = appReceiptTbService.getQrdListPage(request,token,userId,page,size);
        return resultMsg;
    }



    /**
     * 驳回工作量确认单
     * @param request
     * @return
     */
    @RequestMapping(value = "/sample/rejectQrdDal", method = {RequestMethod.POST})
    public ResultMsg rejectQrdDal(HttpServletRequest request, long userId, String token, String rwdbh,String bhgyy){
        ResultMsg resultMsg = appReceiptTbService.rejectQrdDal(request,token,userId,rwdbh,bhgyy);
        return resultMsg;
    }




    /**
     * 设置 通过 通工作量确认单
     * @param request
     * @return
     */
    @RequestMapping(value = "/sample/srtQrdOkProgress", method = {RequestMethod.POST})
    public  ResultMsg srtQrdOkProgress(HttpServletRequest request,long userId, String token,String rwdbh){
        ResultMsg resultMsg = appReceiptTbService.srtQrdOkProgress(request,token,userId,rwdbh);
        return resultMsg;
    }


}
